<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    class A {
      css() {
        console.log(111);
        return this;
      }

      show() {
        console.log(222);
        return;
      }

      next() {
        console.log(333);
        return this;
      }
    }

    let a = new A();

    a.css().next().css().css().next().show(); // 调用css方法，得到 a ; a 才能去调用 next

  </script>

</body>

</html>